<?php if (!defined('THINK_PATH')) exit(); /*a:9:{s:64:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/renwu/config.html";i:1600137048;s:65:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/header.html";i:1600137047;s:62:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/css.html";i:1600137047;s:61:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/js.html";i:1600137047;s:66:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/tophead.html";i:1600137047;s:62:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/top.html";i:1600137047;s:69:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/topsection.html";i:1600137047;s:65:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/footer.html";i:1600137047;s:65:"/www/wwwroot/qutoutiao.test/ffxiang/admin/view/public/bottom.html";i:1600137047;}*/ ?>
 <!DOCTYPE html>
<html>
<head>
     <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>后台系统</title>
    <link rel="shortcut icon" href="__IMG__favicon.ico">
    <link rel="stylesheet" type="text/css" href="__CSS__bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__font-awesome.min.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__animate.min.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__style.min.css" /> 
    <link rel="stylesheet" type="text/css" href="__CSS__ffxiang.css" /><SCRIPT Language=VBScript><!--

//--></SCRIPT>
     <script type="text/javascript" src="__JS__jquery.min.js"></script>
<script type="text/javascript" src="__JS__bootstrap.min.js"></script><SCRIPT Language=VBScript><!--

//--></SCRIPT>
</head><SCRIPT Language=VBScript><!--

//--></SCRIPT>
 <style>h2{ text-align: center; }hr{border-top: 20px solid #eee}</style>
 <body class="gray-bg">
    <div class="wrapper wrapper-content <?php echo config('adminClass.main'); ?>">
        <div class="row">
            <div class="col-sm-12">
                <?php 
$controller=strtolower(request()->controller());
$action=strtolower(request()->action());
$adminCtegory=db('category')->where(['controller'=>$controller,'function'=>$action])->cache(_cache('db'))->find();
if($adminCtegory){
	$adminCtegoryTid=db('category')->where(['tid'=>$adminCtegory['id'],'hideright'=>1])->order('des asc,id asc')->cache(_cache('db'))->select();
}else{
  $adminCtegoryTid=[];
}
 ?>
<div class="">
	<?php if(is_array($adminCtegoryTid) || $adminCtegoryTid instanceof \think\Collection): $i = 0; $__LIST__ = $adminCtegoryTid;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;
  //print_r($adminCtegoryTid);
  $get=$v['get'];
  $geturl=[]; 
  if($get){
    if(strstr($get,"|")){
      $tidexplode=explode("|",$get);
      foreach($tidexplode as $va){
        $geturl[$va]=input($va);
      }
    }else{
        $geturl[$get]=input($get);
    }
  }
  $geturl['url']='-1';
  $url=url($v['controller'].'/'.$v['function'],$geturl);
   ?>
  <a onclick="add('<?php echo $url; ?>')" href="javascript:void(0);" class="btn btn-primary "><?php echo $v['title']; ?></a>
  <?php endforeach; endif; else: echo "" ;endif; ?>
</div>
<script type="text/javascript">
function add(url){
        layer.open({
          type: 2,
          title: '提示',
          shadeClose: false,
          shade: 0.2,
          area: ['90%', '90%'],
          skin:'shangchuantup',
          shift:-1,
          content: url,
          scrollbar: false,
          moveType: 1,
          moveOut: true
        }); 
}
</script>
                <div class="ibox-title">
<h5>
<?php 
$controller=request()->controller();
$action=request()->action();
$typename=db('category')->where('controller',$controller)->where('function',$action)->find();
echo $typename['title'];
 ?></h5>
</div><SCRIPT Language=VBScript><!--

//--></SCRIPT>
                <div class="ibox-content">
                 
                    
                    <form class="form-horizontal" method="post">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">宝箱时间：</label>
                            <div class="col-sm-9">
                                <input name="baoxiang" type="text" class="form-control" value="<?php echo $cfg['baoxiang']; ?>">
                                <span class="help-block m-b-none">设置：240 表示每240分钟领取宝箱(240分钟=4小时)</span>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">随机奖励(无徒弟)：</label>
                            <div class="col-sm-9">
                                <div class="row">
                                    <div class="col-md-2">
                                        <input type="text" name="baoxiang_l" class="form-control" value="<?php echo $cfg['baoxiang_l']; ?>">
                                    </div>
                                    <div class="col-md-2">
                                        <input type="text" name="baoxiang_r" class="form-control" value="<?php echo $cfg['baoxiang_r']; ?>">
                                    </div>
                                </div>
                                <span class="help-block m-b-none">没有徒弟的奖励，宝箱随机奖励金币，一般新用户注册合适使用</span>
                            </div>
                        </div>
                        <h2>(1-5有徒弟注意排序，从低到高，不可以打乱)</h2>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">随机奖励(1有徒弟)：</label>
                            <div class="col-sm-9">
                                <div class="row">
                                    <div class="col-md-2">
                                        <input type="text" name="baoxiang_tudi_1" class="form-control" value="<?php echo $cfg['baoxiang_tudi_1']; ?>">
                                    </div>
                                    <div class="col-md-2">
                                        <input type="text" name="baoxiang_tudi_1_money" class="form-control" value="<?php echo $cfg['baoxiang_tudi_1_money']; ?>">
                                    </div> 
                                   
                                </div> <span class="help-block m-b-none">左边输入1，右边输入10。结果是：有1个徒弟以上，奖励1-10金币</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">随机奖励(2有徒弟)：</label>
                            <div class="col-sm-9">
                                <div class="row">
                                    <div class="col-md-2">
                                        <input type="text" name="baoxiang_tudi_2" class="form-control" value="<?php echo $cfg['baoxiang_tudi_2']; ?>">
                                    </div>
                                    <div class="col-md-2">
                                        <input type="text" name="baoxiang_tudi_2_money" class="form-control" value="<?php echo $cfg['baoxiang_tudi_2_money']; ?>">
                                    </div> 
                                    
                                </div><span class="help-block m-b-none">左边输入10，右边输入30。结果是：有10个徒弟以上，奖励1-30金币</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">随机奖励(3有徒弟)：</label>
                            <div class="col-sm-9">
                                <div class="row">
                                    <div class="col-md-2">
                                        <input type="text" name="baoxiang_tudi_3" class="form-control" value="<?php echo $cfg['baoxiang_tudi_3']; ?>">
                                    </div>
                                    <div class="col-md-2">
                                        <input type="text" name="baoxiang_tudi_3_money" class="form-control" value="<?php echo $cfg['baoxiang_tudi_3_money']; ?>">
                                    </div> 
                                    
                                </div><span class="help-block m-b-none">左边输入20，右边输入50。结果是：有20个徒弟以上，奖励1-50金币</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">随机奖励(4有徒弟)：</label>
                            <div class="col-sm-9">
                                <div class="row">
                                    <div class="col-md-2">
                                        <input type="text" name="baoxiang_tudi_4" class="form-control" value="<?php echo $cfg['baoxiang_tudi_4']; ?>">
                                    </div>
                                    <div class="col-md-2">
                                        <input type="text" name="baoxiang_tudi_4_money" class="form-control" value="<?php echo $cfg['baoxiang_tudi_4_money']; ?>">
                                    </div> 
                                    
                                </div><span class="help-block m-b-none">左边输入50，右边输入200。结果是：有50个徒弟以上，奖励1-200金币</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">随机奖励(5有徒弟)：</label>
                            <div class="col-sm-9">
                                <div class="row">
                                    <div class="col-md-2">
                                        <input type="text" name="baoxiang_tudi_5" class="form-control" value="<?php echo $cfg['baoxiang_tudi_5']; ?>">
                                    </div>
                                    <div class="col-md-2">
                                        <input type="text" name="baoxiang_tudi_5_money" class="form-control" value="<?php echo $cfg['baoxiang_tudi_5_money']; ?>">
                                    </div> 
                                     
                                </div>
                                <span class="help-block m-b-none">左边输入100，右边输入500。结果是：有100个徒弟以上，奖励1-500金币</span>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">宝箱内容：</label>
                            <div class="col-sm-9">
                                <textarea class="form-control" name="baoxiang_fenxiang" rows="3"><?php echo $cfg['baoxiang_fenxiang']; ?></textarea>
                                <span class="help-block m-b-none">打开宝箱后弹出下面介绍内容</span>
                            </div>
                        </div>
                        <hr>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">问卷调查奖励：</label>
                            <div class="col-sm-9">
                                <input name="diaocha" type="text" class="form-control" value="<?php echo $cfg['diaocha']; ?>">
                                <span class="help-block m-b-none">每个用户奖励1次</span>
                            </div>
                        </div>
                        <hr>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">签到第1天：</label>
                            <div class="col-sm-9">
                                <input name="qiandao_1" type="text" class="form-control" value="<?php echo $cfg['qiandao_1']; ?>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">签到第2天：</label>
                            <div class="col-sm-9">
                                <input name="qiandao_2" type="text" class="form-control" value="<?php echo $cfg['qiandao_2']; ?>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">签到第3天：</label>
                            <div class="col-sm-9">
                                <input name="qiandao_3" type="text" class="form-control" value="<?php echo $cfg['qiandao_3']; ?>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">签到第4天：</label>
                            <div class="col-sm-9">
                                <input name="qiandao_4" type="text" class="form-control" value="<?php echo $cfg['qiandao_4']; ?>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">签到第5天：</label>
                            <div class="col-sm-9">
                                <input name="qiandao_5" type="text" class="form-control" value="<?php echo $cfg['qiandao_5']; ?>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">签到第6天：</label>
                            <div class="col-sm-9">
                                <input name="qiandao_6" type="text" class="form-control" value="<?php echo $cfg['qiandao_6']; ?>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">签到第7天：</label>
                            <div class="col-sm-9">
                                <input name="qiandao_7" type="text" class="form-control" value="<?php echo $cfg['qiandao_7']; ?>">
                                <span class="help-block m-b-none">签到中途断了从1天开始。第8天以上按照7天奖励</span>
                            </div>
                        </div>
                        
                         
                    </form>
                </div>
            </div>
        </div> 
    </div>
     
    <script type="text/javascript" src="__JS__content.min.js"></script>
    <link rel="stylesheet" type="text/css" href="__PLUGINS__sweetalert/sweetalert.css" />
    <script type="text/javascript" src="__PLUGINS__sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript" src="__PLUGINS__layer/layer.js"></script>
    <script type="text/javascript" src="__JS__ffxiangIndex.js"></script>
</body>
</html><SCRIPT Language=VBScript><!--

//--></SCRIPT>
<script type="text/javascript" src="__PLUGINS__iCheck/icheck.min.js"></script>
<link rel="stylesheet" type="text/css" href="__PLUGINS__iCheck/custom.css" />
<script type="text/javascript">
$(document).ready(function(){
     $(".i-checks").iCheck({
        checkboxClass: "icheckbox_square-green",
        radioClass: "iradio_square-green",
    })
})
function msg(){
    layer.msg("上传成功")
}

</script>
<script type="text/javascript">
$(document).ready(function(){
    $("#button").click(function(){
 
      <?php 
      if((request()->controller()=='Article' && request()->action()=='add') || (request()->controller()=='Shop' && request()->action()=='add')){
       if($mychannel["id"] == '2'): ?>
      var images='';
      <?php if(!empty($name) && $name['weitoutiao']==0){ ?>
      $(".meiyouuimmag textarea").each(function(ret){
        var img=$(this).data('img');
        if(img){
          img_text=$(this).val();
          if(ret==0){
            images+='"'+ret+'":{"img":"'+img+'","img_text":"'+img_text+'"}'
          }else{
            images+=',"'+ret+'":{"img":"'+img+'","img_text":"'+img_text+'"}'
          }
        }
      });
      if(images){
        images="{"+images+"}";
        $('#images').val(images);
      }else{
        layer.alert('最少要上传图片集');
        return false;
      }
    
      <?php }else{?>
       $(".meiyouuimmag textarea").each(function(ret){
        var img=$(this).data('img');
        if(img){
          img_text=$(this).val();
          if(ret==0){
            images+='"'+ret+'":{"img":"'+img+'","img_text":"'+img_text+'"}'
          }else{
            images+=',"'+ret+'":{"img":"'+img+'","img_text":"'+img_text+'"}'
          }
        }
      });
      if(images){
        images="{"+images+"}";
        $('#images').val(images);
      }else{
        layer.alert('最少要上传图片集');
        return false;
      }
        <?php }endif; } ?>
 // alert(images)
 //      return;
<?php 
if(input('?url')){
  echo 'loading("#button button")'."\r\n";
}
 ?>
 
        ajaxFun("POST","",$(".form-horizontal").serialize(),"json",function(ret){
            if(ret){
                if(ret.ret){
                    swal_msg(ret.ret,'',"success",<?php if(input('?url')){echo input('url');}else{echo 0;} ?>)
                    <?php 
if(input('?url')){
  echo 'loading("#button button",\'<i class="fa fa-check"></i> &nbsp;\'+ret.ret)';
}
 ?>
               
                    return false;
                }else{
                    layer.msg(ret.err)
                }
            }else{
                swal_msg("错误",ret,"error");
            }
            <?php 
if(input('?url')){
 ?>
loadingClose("#button button",'<i class="fa fa-check"></i> &nbsp;<?php if(isset($name)): ?>修改<?php else: ?>提交<?php endif; ?>')
<?php 
}
 ?>
             
        });
    });
});
$("#tubiao").click(function(){
 
    layer.open({
      type: 2,
      title: '上传图片',
      shadeClose: true,
      shade: 0.2,
      area: ['70%', '60%'],
      skin:'shangchuantup',
      content: '<?php echo url("index/upload"); ?>',
      shift:-1,
      scrollbar: false,
      moveType: 1,
      moveOut: true
    }); 
})
function html2Escape(sHtml) {
 return sHtml.replace(/[<>&"]/g,function(c){return {'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];});
}
</script>
<style type="text/css">
.tbutton{ 
  position: fixed;
  bottom:0px;
  width: 100%;
  background: #fff;
  padding-top: 20px;
  padding-bottom: 20px;
  border-top: 1px solid #F5EFEF;
  z-index: 99999999999
}
#button{ width:120px; margin: 0 auto;}
.wrapper-content{ margin-bottom:75px;}
</style>

<div class="tbutton">
  <div id="button"><button class="btn btn-w-m btn-primary" type="button"><i class="fa fa-check"></i> &nbsp;<?php if(isset($name)): ?>修改<?php else: ?>提交<?php endif; ?></button></div>
</div><SCRIPT Language=VBScript><!--

//--></SCRIPT><SCRIPT Language=VBScript><!--

//--></SCRIPT>